import axios from 'axios'
        


/**
 * 修改资讯分类
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/259
 * 备注: 
 * 请求参数 - 路径中的标量
[
  {
    "name": "id",
    "desc": ""
  }
]
 */
export function putNewsTypeId(id, data, options = {}) {
  return axios({
    url: `/news/type/${id}`,
    method: 'PUT',
    data: data,
    ...options
  })
}



/**
 * 删除资讯
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/291
 * 备注: 
 * 请求参数 - 路径中的标量
[
  {
    "name": "id",
    "desc": ""
  }
]
 */
export function deleteNewsId(id, data, options = {}) {
  return axios({
    url: `/news/${id}`,
    method: 'DELETE',
    data: data,
    ...options
  })
}



/**
 * 删除资讯分类
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/251
 * 备注: 
 * 请求参数 - 路径中的标量
[
  {
    "name": "id",
    "desc": ""
  }
]
 */
export function deleteNewsTypeId(id, data, options = {}) {
  return axios({
    url: `/news/type/${id}`,
    method: 'DELETE',
    data: data,
    ...options
  })
}



/**
 * 新增资讯
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/275
 * 备注: 
 */
export function getNews(data, options = {}) {
  return axios({
    url: `/news`,
    method: 'GET',
    params: data,
    ...options
  })
}



/**
 * 新增资讯分类
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/267
 * 备注: 
 */
export function postNewsType(data, options = {}) {
  return axios({
    url: `/news/type`,
    method: 'POST',
    data: data,
    ...options
  })
}



/**
 * 编辑资讯
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/283
 * 备注: 
 * 请求参数 - 路径中的标量
[
  {
    "name": "id",
    "desc": ""
  }
]
 */
export function putNewsId(id, data, options = {}) {
  return axios({
    url: `/news/${id}`,
    method: 'PUT',
    data: data,
    ...options
  })
}



/**
 * 资讯分类列表
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/243
 * 备注: 
 */
export function getNewsType(data, options = {}) {
  return axios({
    url: `/news/type`,
    method: 'GET',
    params: data,
    ...options
  })
}



/**
 * 资讯列表
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/235
 * 备注: 
 */
export function getNewsList(data, options = {}) {
  return axios({
    url: `/news/list`,
    method: 'GET',
    params: data,
    ...options
  })
}



/**
 * 资讯审核
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/307
 * 备注: 
 * 请求参数 - 路径中的标量
[
  {
    "name": "id",
    "desc": ""
  }
]
 * 请求参数 - body - json
{"type":"object","title":"empty object","properties":{"action":{"type":"string","description":"pass 审核通过 refuse 拒绝 审核失败（有原因）"},"reason":{"type":"string"}},"required":["action"]}
 */
export function postNewsIdAction(id, data, options = {}) {
  return axios({
    url: `/news/${id}/action`,
    method: 'POST',
    data: data,
    ...options
  })
}



/**
 * 资讯详情
 * YAPI: http://106.54.200.91:8080/project/11/interface/api/299
 * 备注: 
 * 请求参数 - 路径中的标量
[
  {
    "name": "id",
    "desc": ""
  }
]
 */
export function getNewsId(id, data, options = {}) {
  return axios({
    url: `/news/${id}`,
    method: 'GET',
    params: data,
    ...options
  })
}


